using System;
using System.Runtime.Serialization;

namespace PoolKit
{
    /// <summary>
    /// Thrown when pool - for whathever reason - cannot lend another resource
    /// </summary>
	[Serializable]
	public class CannotLendResourceException : PoolOperationException
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="CannotLendResourceException"/>
		/// </summary>
		public CannotLendResourceException()
		{
		}
		
		/// <summary>
		/// Initializes a new instance of the <see cref="CannotLendResourceException"/> class
		/// </summary>
		/// <param name="message">A <see cref="System.String"/> that describes the exception. </param>
		public CannotLendResourceException (string message) : base (message)
		{
		}
		
		/// <summary>
		/// Initializes a new instance of the <see cref="CannotLendResourceException"/> class
		/// </summary>
		/// <param name="message">A <see cref="System.String"/> that describes the exception. </param>
		/// <param name="inner">The exception that is the cause of the current exception.</param>
		public CannotLendResourceException (string message, Exception inner) : base (message, inner)
		{
		}
		
		/// <summary>
		/// Initializes a new instance of the <see cref="CannotLendResourceException"/> class
		/// </summary>
		/// <param name="context">The contextual information about the source or destination.</param>
		/// <param name="info">The object that holds the serialized object data.</param>
		protected CannotLendResourceException (SerializationInfo info, StreamingContext context) : base (info, context)
		{
		}
	}
}